package com.xdog.okx.exception;

import lombok.Getter;

/**
 * OKX API异常类
 * 用于处理API调用过程中发生的错误
 */
@Getter
public class OkxApiException extends RuntimeException {
    
    /**
     * 错误码
     */
    private final String code;
    
    /**
     * HTTP状态码
     */
    private final int httpStatus;
    
    /**
     * 错误信息
     */
    private final String message;
    
    public OkxApiException(String code, int httpStatus, String message) {
        super(message);
        this.code = code;
        this.httpStatus = httpStatus;
        this.message = message;
    }
    
    public OkxApiException(String code, int httpStatus, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
        this.httpStatus = httpStatus;
        this.message = message;
    }
}